home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SSSSEEEETTTTHHHHOOOOSSSSTTTTRRRREEEESSSSOOOORRRRDDDDEEEERRRR((((3333NNNN)))) SSSSEEEETTTTHHHHOOOOSSSSTTTTRRRREEEESSSSOOOORRRRDDDDEEEERRRR((((3333NNNN))))
-
-
-
- NNNNAAAAMMMMEEEE
- sethostresorder - specify order of host-address resolution services
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- iiiinnnntttt sssseeeetttthhhhoooossssttttrrrreeeessssoooorrrrddddeeeerrrr((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****oooorrrrddddeeeerrrr))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The _g_e_t_h_o_s_t_b_y_n_a_m_e(3N) and _g_e_t_h_o_s_t_b_y_a_d_d_r(3N) routines can access three
- types of host-address databases:
-
- +o the hosts file, /etc/hosts,
-
- +o Sun's network information service (NIS) and
-
- +o the Berkeley Internet Name Domain service ("BIND name server").
-
- _s_e_t_h_o_s_t_r_e_s_o_r_d_e_r allows a program to specify the order of services to
- resolve Internet addresses and hostnames from these databases.
-
- _s_e_t_h_o_s_t_r_e_s_o_r_d_e_r should be called before the first time _g_e_t_h_o_s_t_b_y_n_a_m_e and
- _g_e_t_h_o_s_t_b_y_a_d_d_r are called. The _o_r_d_e_r argument is a character string that
- contains keywords for the lookup services. See the description of
- _h_o_s_t_r_e_s_o_r_d_e_r in _r_e_s_o_l_v_e_r(4) for the list and meaning of keywords and
- separators. The colon (:) character is equivalent to white space as a
- keyword separator. For example,
-
- sethostresorder("nis bind local");
- sethostresorder("nis:bind:local");
-
- are equivalent.
-
- There are two versions of this routine: the standard version in libc
- and the NIS version in libsun. The programmatic interface of both
- versions is identical, except the standard version ignores the NIS
- keyword. The libc default order is ``bind / local'' and the libsun
- default is ``nis / bind / local''.
-
- This routine overrides the order specified by the _h_o_s_t_r_e_s_o_r_d_e_r keyword in
- /_e_t_c/_r_e_s_o_l_v._c_o_n_f and the HOSTRESORDER environment variable.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- _s_e_t_h_o_s_t_r_e_s_o_r_d_e_r returns 0 if the order was changed, otherwise it returns
- -1. Unrecognized keywords are ignored.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- intro(3), gethostbyname(3N), resolver(4)
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-